<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8" />
    <title>嵌入式</title>
    <script>
    function hello() {
        document.getElementById("demo").innerHTML = "Hello World！";
    }
    </script>
</head>

<body>
    <p id="demo" onclick="hello()">单击这段文字</p>
</body>

</html>